package com.ithjh;

import com.ithjh.config.SpringConfig;
import com.ithjh.domain.Account;
import com.ithjh.service.AccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.nio.channels.AcceptPendingException;

public class APP1 {
    public static void main(String[] args) {
        ApplicationContext ctx = new AnnotationConfigApplicationContext(SpringConfig.class);
        AccountService accountService = ctx.getBean(AccountService.class);
        Account byId = accountService.findById(2);
        System.out.println(byId);
    }
}
